package
{
	import flash.display.MovieClip;
	import flash.events.MouseEvent;
	
	public class Btn extends MovieClip
	{
		private var btn:MovieClip;
		
		public function Btn()
		{
			buttonMode = true;
			
			btn = Resource.getMovieClip("btn");
			addChild(btn);
			btn.mouseChildren = false;
			btn.addEventListener(MouseEvent.MOUSE_OVER,overHandler);
			btn.addEventListener(MouseEvent.MOUSE_OUT,outHandler);
		}
		
		public function set text(value:String):void
		{
			btn["txt"].text = value;
		}
		
		private function overHandler(e:MouseEvent):void
		{
			btn.gotoAndStop(2);
		}
		
		private function outHandler(e:MouseEvent):void
		{
			btn.gotoAndStop(1);
		}
	}
}